//
//  ZFImageCollectionCell.m
//  ZFHorizontalMenuView
//
//  Created by linzaifei on 2021/9/3.
//

#import "ZFImageCollectionCell.h"

@implementation ZFImageCollectionCell
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self initZFImageCollectionCell];
    }
    return self;
}

-(void)initZFImageCollectionCell{
    UIImageView *imageView = [UIImageView new];
    imageView.image = [UIImage imageNamed:@"ic_sign_cj"];
    [self.contentView addSubview:imageView];
    
    imageView.translatesAutoresizingMaskIntoConstraints = NO;
    
    [self.contentView addConstraint:[NSLayoutConstraint constraintWithItem:imageView attribute:NSLayoutAttributeCenterX relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeCenterX multiplier:1 constant:0]];
    [self.contentView addConstraint:[NSLayoutConstraint constraintWithItem:imageView attribute:NSLayoutAttributeCenterY relatedBy:NSLayoutRelationEqual toItem:self.contentView attribute:NSLayoutAttributeCenterY multiplier:1 constant:0]];
    
}

@end
